<%@ page import="jakarta.servlet.http.Cookie" %><%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2021/7/26
  Time: 18:08
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>getCookies</title>
</head>
<body>
    <%
        //客户端
        Cookie[] cookies = request.getCookies();
        for(Cookie cookie:cookies){
            out.print(cookie.getName() + " → " + cookie.getValue() + "<br/>");
        }
    %>
</body>
</html>
